package com.hsogoo.avatar.executor;

import com.hsogoo.avatar.executor.disruptor.AvatarDisruptor;
import com.lmax.disruptor.BlockingWaitStrategy;

/**
 * Created by za-huangsaigang on 2018/10/23.
 */
public class DisruptorExecutorFactory extends AbstractExecutorFactory {
    @Override
    public AvatarExecutor newExecutor(Target target, String name) {

        AvatarExecutor executor = new AvatarDisruptor(
                coreWorkers(target),
                threadFactory(name),
                queueCapacity(target),
                maxWorkers(target),
                new BlockingWaitStrategy(),
                "avatar");
        return executor;
    }
}
